import request from '@/utils/request'
import defaultSettings from '@/settings'
export function list(query) {
  return request({
    url: defaultSettings.serviceUrl.moon_fast + '/dict/sysDict/list',
    method: 'post',
    data: query
  })
}
export function childList(parentId) {
  return request({
    url: defaultSettings.serviceUrl.moon_fast + '/dict/sysDict/childList?parentId=' + parentId,
    method: 'get'
  })
}

export function getDictByCode(code) {
  return request({
    url: defaultSettings.serviceUrl.moon_fast + '/dict/sysDict/getDictByCode?code=' + code,
    method: 'get'
  })
}
export function getTopDictList(code) {
  return request({
    url: defaultSettings.serviceUrl.moon_fast + '/dict/sysDict/getTopDictList',
    method: 'get'
  })
}

export function editSave(data) {
  return request({
    url: defaultSettings.serviceUrl.moon_fast + '/dict/sysDict/editSave',
    method: 'post',
    data: data
  })
}
export function removeByIds(id) {
  return request({
    url: defaultSettings.serviceUrl.moon_fast + '/dict/sysDict/removeByIds?ids=' + id,
    method: 'get'
  })
}
export function updateStatusById(id,status) {
  return request({
    url: defaultSettings.serviceUrl.moon_fast + '/dict/sysDict/updateStatusById?id=' + id +'&status='+status,
    method: 'get'
  })
}
export function cleanCache() {
  return request({
    url: defaultSettings.serviceUrl.moon_fast + '/dict/sysDict/cleanCache',
    method: 'get'
  })
}
